package sg.edu.ntu.sci.blackboard.agilix.model;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author ngocgiang
 */
public class Course extends CourseElement {

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getConnectionid() {
        return connectionid;
    }

    public void setConnectionid(String connectionid) {
        this.connectionid = connectionid;
    }

    public String getNativeid() {
        return nativeid;
    }

    public void setNativeid(String nativeid) {
        this.nativeid = nativeid;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public List<Folder> getFolders() {
        return folders;
    }

    // debug method
    public void printCourse() {
        for (Folder folder : getFolders()) {
            if (folder instanceof DiscussionBoard) {
                List<Forum> forums = ((DiscussionBoard) folder).getForums();
                for (Forum forum : forums) {
                    List<Message> messages = forum.getMessages();
                    for (Message message : messages) {
                        message.printMessage();
                    }
                }
            }
        }
    }

    private String nativeid;
    private String state;
    private String connectionid;
    private String website;
    private String color;
    private List<Folder> folders = new ArrayList<Folder>();
}
